<template>
  <div class="not-found">
    <div class="not-found-content">
      <div class="error-code">404</div>
      <div class="error-message">页面未找到</div>
      <div class="error-description">
        抱歉，您访问的页面不存在或已被删除。
      </div>
      <div class="actions">
        <button class="btn btn-primary" @click="goHome">返回首页</button>
        <button class="btn btn-secondary" @click="goBack">返回上一页</button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'NotFound',
  methods: {
    goHome() {
      this.$router.push('/dashboard')
    },
    goBack() {
      this.$router.go(-1)
    }
  },
  mounted() {
    document.title = '页面未找到 - 管理系统'
  }
}
</script>

<style scoped lang="scss">
.not-found {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  
  .not-found-content {
    text-align: center;
    background: white;
    padding: 60px 40px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    
    .error-code {
      font-size: 120px;
      font-weight: bold;
      color: #1890ff;
      margin-bottom: 20px;
      text-shadow: 0 4px 8px rgba(24, 144, 255, 0.3);
    }
    
    .error-message {
      font-size: 32px;
      font-weight: 600;
      color: #333;
      margin-bottom: 16px;
    }
    
    .error-description {
      font-size: 16px;
      color: #666;
      margin-bottom: 40px;
      line-height: 1.6;
    }
    
    .actions {
      display: flex;
      gap: 16px;
      justify-content: center;
      flex-wrap: wrap;
    }
    
    .btn {
      padding: 12px 24px;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 500;
      transition: all 0.3s;
      min-width: 120px;
      
      &.btn-primary {
        background: #1890ff;
        color: white;
        
        &:hover {
          background: #0050b3;
          transform: translateY(-2px);
          box-shadow: 0 8px 20px rgba(24, 144, 255, 0.3);
        }
      }
      
      &.btn-secondary {
        background: #f5f5f5;
        color: #333;
        border: 1px solid #ddd;
        
        &:hover {
          background: #e6f7ff;
          border-color: #1890ff;
          color: #1890ff;
          transform: translateY(-2px);
        }
      }
    }
  }
}

@media (max-width: 768px) {
  .not-found {
    .not-found-content {
      padding: 40px 20px;
      
      .error-code {
        font-size: 80px;
      }
      
      .error-message {
        font-size: 24px;
      }
      
      .actions {
        flex-direction: column;
        
        .btn {
          width: 100%;
        }
      }
    }
  }
}
</style> 